package net.llz.service;

import net.llz.exception.BizException;
import net.llz.model.CouponRecordMessage;
import net.llz.request.LockCouponRecordRequest;
import net.llz.util.JsonData;
import net.llz.vo.CouponRecordVO;

import java.util.Map;

public interface CouponRecordService {
    Map<String, Object> page(int page, int size);

    CouponRecordVO findById(long recordId);

    /**
     * 锁定优惠卷
     * @param recordRequest
     * @return
     */
    JsonData lockCouponRecords(LockCouponRecordRequest recordRequest) throws BizException;

    /**
     * 释放优惠卷记录
     * @param recordMessage
     * @return
     */
    boolean releaseCouponRecord(CouponRecordMessage recordMessage);
}
